package mx.com.asteca.persistencia.entidades;
// Generated 31/07/2013 11:41:38 AM by Hibernate Tools 3.2.1.GA


import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * TiposCatGral generated by hbm2java
 */
@Entity
@Table(name="tipos_cat_gral"
    ,catalog="astecadb"
)
public class TiposCatGral  implements java.io.Serializable {


     private short idCatGral;
     private String tipo;
     private Set<CatGral> catGrals = new HashSet<CatGral>(0);

    public TiposCatGral() {
    }

	
    public TiposCatGral(short idCatGral) {
        this.idCatGral = idCatGral;
    }
    public TiposCatGral(short idCatGral, String tipo, Set<CatGral> catGrals) {
       this.idCatGral = idCatGral;
       this.tipo = tipo;
       this.catGrals = catGrals;
    }
   
     @Id 
     @GeneratedValue(strategy=GenerationType.IDENTITY)
    @Column(name="ID_CAT_GRAL", unique=true, nullable=false)
    public short getIdCatGral() {
        return this.idCatGral;
    }
    
    public void setIdCatGral(short idCatGral) {
        this.idCatGral = idCatGral;
    }
    
    @Column(name="TIPO", length=20)
    public String getTipo() {
        return this.tipo;
    }
    
    public void setTipo(String tipo) {
        this.tipo = tipo;
    }
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="tiposCatGral")
    public Set<CatGral> getCatGrals() {
        return this.catGrals;
    }
    
    public void setCatGrals(Set<CatGral> catGrals) {
        this.catGrals = catGrals;
    }




}


